<template>
	<view class="content">
		<view class="info-block">
			<view class="project-block">
				<view class="title-item">
					<view class="round" v-if="info.status===64"></view>
					<view class="round1" v-else-if="info.status===63"></view>
					<view class="round2" v-else-if="info.status===65"></view>
					<view class="title">{{info.name}}</view>
				</view>
				<view class="build-item">
					<view class="build"><text class="txt">项目类型：</text>{{info.classText}}</view>
					<view class="build"><text class="txt">包抓领导：</text>{{info.leader}}</view>
					<view class="build"><text class="txt">责任单位：</text>{{info.departmentText}}</view>
					<view class="build"><text class="txt">主要建设规模：</text>{{info.scale}}</view>
				</view>
			</view>
		</view>
	</view>
	</view>
</template>

<script>
	import {
		selectProjectById
	} from '@/api/search.js'
	import {
		isMore
	} from '@/util/util.js'
	export default {
		data() {
			return {
				info: {},
			}
		},
		methods: {
			getList() {
				uni.showLoading({
					title: '加载中',
					mask: true
				})
				selectProjectById({
					id: this.id
				}).then(data => {
					uni.hideLoading()
					this.info = data || [];
					console.log(this.info)
				}).catch(() => {
					uni.hideLoading()
				})
			}
		},
		onLoad(e) {
			this.id = e.id
			this.getList()
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		background: #F5F5F5;
		min-height: 100vh;

		.info-block {
			min-height: 80vh;
			display: flex;
			flex-direction: column;
			border-radius: 40rpx;
			height: auto;
			position: relative;
			padding: 30rpx;

			.search-block {
				position: relative;
				width: 100%;
				height: 60rpx;
				//padding: 0 30rpx;
				display: flex;
				flex-direction: row;
				align-items: center;
				margin-bottom: 30rpx;

				.input-block {
					width: 100%;
					display: flex;
					flex-direction: row;
					align-items: center;
					border: 1px solid #808080;
					border-radius: 40rpx;
					padding: 0 10rpx;
					height: 60rpx;

					.iconfont {
						flex-grow: 0;
						color: #808080;
						margin: 0 10rpx;
					}

					input {
						flex-grow: 1;
						font-size: 28rpx;
						color: #808080;
						margin: 0 10rpx;
					}
				}
			}

			.tips {
				display: flex;
				flex-direction: row;
				align-items: center;
				padding: 30rpx;
				border-radius: 20rpx;
				margin-bottom: 30rpx;

				.img {
					width: 45rpx;
					height: 45rpx;
					margin-right: 20rpx;
				}

				.text {
					font-size: 32rpx;
					width: calc(100% - 80rpx);

					.total {
						font-weight: bold;
					}
				}
			}

			.project-block {
				background-color: #fff;
				border-radius: 20rpx;
				padding: 30rpx;
				margin-bottom: 30rpx;
				box-shadow: 0 0 10px 0 #dedede;

				.title-item {
					display: flex;
					flex-direction: row;

					.round {
						width: 40rpx;
						height: 40rpx;
						border-radius: 50%;
						background-color: #FFA101;
						margin-top: 12rpx;
						margin-right: 10rpx;
					}

					.round1 {
						width: 40rpx;
						height: 40rpx;
						border-radius: 50%;
						background-color: #127DFF;
						margin-top: 12rpx;
						margin-right: 10rpx;
					}

					.round2 {
						width: 40rpx;
						height: 40rpx;
						border-radius: 50%;
						background-color: #FE0000;
						margin-top: 12rpx;
						margin-right: 10rpx;
					}

					.title {
						width: calc(100% - 55rpx);
						font-size: 34rpx;
						font-weight: bold;
						line-height: 60rpx;
					}
				}

				.build-item {
					padding: 20rpx;
					background: #F5F5F5;
					line-height: 60rpx;
					border-radius: 20rpx;
					margin-top: 20rpx;

					.build {
						font-size: 28rpx;

						.txt {
							color: #999;
						}
					}
				}

				.total-list {
					width: 100%;
					display: flex;
					flex-direction: row;
					align-items: center;
					margin-top: 20rpx;
					justify-content: space-between;

					.total-item {
						display: flex;
						flex-direction: column;
						align-items: center;

						.money {
							font-weight: bold;
							font-size: 34rpx;
						}

						.text {
							font-size: 28rpx;
							color: #999;
							margin-top: 10rpx;
						}

						.status {
							display: flex;
							flex-direction: row;
							align-items: center;


							.text {
								font-size: 28rpx;
								color: #EF731B;
								font-weight: 600;
							}
						}

						.status2 {
							display: flex;
							flex-direction: row;
							align-items: center;

							.round {
								width: 30rpx;
								height: 30rpx;
								border-radius: 50%;
								background-color: #E30302;
								margin-top: 10rpx;
								margin-right: 10rpx;
							}

							.text {
								font-size: 28rpx;
								color: #E30302;
								font-weight: 600;
							}
						}

						.status3 {
							display: flex;
							flex-direction: row;
							align-items: center;

							.round {
								width: 30rpx;
								height: 30rpx;
								border-radius: 50%;
								background-color: #029602;
								margin-top: 10rpx;
								margin-right: 10rpx;
							}

							.text {
								font-size: 28rpx;
								color: #029602;
								font-weight: 600;
							}
						}
					}

					.thread {
						width: 4rpx;
						height: 40rpx;
						border-radius: 4rpx;
						background-image: linear-gradient(#fff, #999, #fff);
					}
				}
			}
		}
	}
</style>